
public class DobleFractional {
	
	public static void test1() {
		double num;
		long iPart;
		double fPart;

		// Get user input
		num = 2.3d;
		iPart = (long) num;
		fPart = num - iPart;
		System.out.println("Integer part from 2.3 = " + iPart);
		System.out.println("Fractional part = " + fPart);
	}
	
	public static void test2() {
		double myDub;
        myDub=3.3;
        long myLong;
        myLong=(int)myDub;
        myDub=(myDub%1)*10000;
        System.out.println("myDub: " + myDub);
        int myInt=(int)myDub;
        System.out.println("- " + myLong + "\n" + "- 0." + myInt);
	}
	
	public static void test3() {
		double value = 3.3;
		double fractPart = value - 3;
		double fractionalPart = value % 1;
		double integralPart = value - fractionalPart;
		System.out.println("Value = " + value);
		System.out.println("Fractional part 1 = " + fractionalPart);
		System.out.println("Fractional part 2 = " + fractPart);
		System.out.println("Integral part = " + integralPart);
	} 
	
	public static void test4() {
		double n = 3.3;
		Double d = Double.parseDouble(Double.toString(n));
		int exponent = (int)(Math.log(n));
		double	mantissa = n / Math.pow(10, exponent);
		System.out.println("" + exponent + " " + mantissa);
		Fraction fract = new Fraction(3, 5);
		System.out.println("F: " + fract.doubleValue());
	}
	
	
	public static void main(String[] args) {
        test4();
    }
}
